//缓存方法
export const cache = {
    setSimple(key, value) {
        window.localStorage.setItem(key, value)
    },
    getSimple(key) {
        return window.localStorage.getItem(key)
    },
    setObject(key, value) {
        window.localStorage.setItem(key, JSON.stringify(value))
    },
    getObject(key) {
        return JSON.parse(window.localStorage.getItem(key))
    },
    remove(key) {
        window.localStorage.removeItem(key)
    },
    clear() {
        window.localStorage.clear()
    }
}

export default {cache}